Skip to content

Conversation

@az2924
Copy link
Collaborator

@az2924 az2924 commented Jan 15, 2026

603

Description of changes

Replaced application.properties & application-ci.properties with application.yml & application-ci.yml

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Dev

Routes Working:
https://github.com/user-attachments/assets/f70b93fd-8821-48f7-801b-6c43c3b80eea

/swagger-ui/index.html Working:
Screenshot 2026-01-15 at 3 28 42 PM

/v3/api-docs Working:
Screenshot 2026-01-15 at 3 28 19 PM

/actuator/prometheus Working:
Screenshot 2026-01-15 at 3 17 52 PM

Staging

Routes Working:
https://github.com/user-attachments/assets/98d44045-ca7d-41a7-be2b-3b8b3a1f9038

/swagger-ui/index.html Working:
Screenshot 2026-01-15 at 4 09 19 PM

/v3/api-docs Working:
Screenshot 2026-01-15 at 4 09 33 PM

/actuator/prometheus Working:
Screenshot 2026-01-15 at 4 14 09 PM

Monitoring Staging:
Screenshot 2026-01-15 at 5 19 57 PM
Screenshot 2026-01-15 at 5 20 01 PM
Screenshot 2026-01-15 at 5 20 05 PM

@github-actions
Copy link
Contributor

Title

603: Replaced properties with yml


PR Type

Enhancement, Configuration changes


Description

  • Migrate properties to YAML configs

  • Add new application.yml structure

  • Introduce application-ci.yml for CI

  • Normalize Redis config under jedis.url


Diagram Walkthrough

flowchart LR
  A["application.properties (legacy)"] -- "removed" --> B["application.yml (hierarchical)"]
  C["application-ci.properties (legacy)"] -- "replaced" --> D["application-ci.yml (jedis.url)"]
Loading

File Walkthrough

Relevant files
Configuration changes
application-ci.properties
Remove legacy CI properties entry                                               

src/main/resources/application-ci.properties

  • Remove legacy line format
  • Retain jedis.url placeholder temporarily
+0/-1     
application-ci.yml
Add CI YAML with Redis URL                                                             

src/main/resources/application-ci.yml

  • Add YAML CI config
  • Define jedis.url from REDIS_URL
+2/-0     
application.properties
Remove monolithic properties configuration                             

src/main/resources/application.properties

  • Remove full properties configuration
  • Replace with YAML counterpart
+0/-78   
Enhancement
application.yml
Introduce hierarchical Spring Boot YAML config                     

src/main/resources/application.yml

  • Add full YAML configuration tree
  • Convert Spring, GitHub, JDA, management settings
  • Use ISO-8601 request-timeout and cache settings
  • Keep secrets via environment variables
+117/-0 

@github-actions
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Secrets handling:
Multiple secrets are still sourced from environment variables (e.g., DISCORD_CLIENT_SECRET, GH_PASSWORD, ACTUATOR_PASSWORD). Confirm no defaults are committed, ensure they are masked in logs, and verify the actuator credentials and secret key are not exposed via Spring Actuator or error pages.

⚡ Recommended focus areas for review

Config Parity

Validate that every key formerly in properties has an equivalent in YAML (e.g., Redis/Jedis, Flyway enablement, server.url) and that profile-specific overrides still work as expected for local and staging.

spring:
  application:
    name: codebloom

  datasource:
    url: jdbc:postgresql://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
    username: ${DATABASE_USER}
    password: ${DATABASE_PASSWORD}
    driver-class-name: org.postgresql.Driver
    hikari:
      maximum-pool-size: 10
      minimum-idle: 5
      connection-timeout: 30000
      idle-timeout: 600000
      max-lifetime: 1800000

  flyway:
    enabled: false

  security:
    oauth2:
      client:
        registration:
          discord:
            client-id: ${DISCORD_CLIENT_ID}
            client-secret: ${DISCORD_CLIENT_SECRET}
            scope: identify,email
            authorization-grant-type: authorization_code
            redirect-uri: "{baseUrl}/api/auth/flow/callback/{registrationId}"
        provider:
          discord:
            authorization-uri: https://discord.com/oauth2/authorize
            token-uri: https://discord.com/api/oauth2/token
            user-info-uri: https://discord.com/api/users/@me
            user-name-attribute: username

  threads:
    virtual:
      enabled: true

  main:
    keep-alive: true

  mvc:
    async:
      request-timeout: PT3H

  web:
    resources:
      add-mappings: false
      cache:
        cachecontrol:
          max-age: 30m
          public: true

springdoc:
  swagger-ui:
    enabled: ${ENABLE_DOCUMENTATION}
  api-docs:
    enabled: ${ENABLE_DOCUMENTATION}
    version: OPENAPI_3_0

github:
  username: ${GH_USERNAME}
  password: ${GH_PASSWORD}
  email:
    host: ${GH_EMAIL_HOST}
    port: ${GH_EMAIL_PORT}
    type: ${GH_EMAIL_TYPE}
    username: ${GH_EMAIL_USERNAME}
    password: ${GH_EMAIL_PASSWORD}

jda:
  discord:
    token: ${DISCORD_TOKEN}
    patina:
      guild-id: ${DISCORD_PATINA_GUILD_ID}
      leetcode-channel-id: ${DISCORD_PATINA_LEETCODE_CHANNEL_ID}
    reporting:
      error:
        guild-id: ${DISCORD_REPORTING_GUILD_ID}
        channel-id: ${DISCORD_REPORTING_CHANNEL_ID}
      log:
        guild-id: ${DISCORD_REPORTING_LOG_GUILD_ID}
        channel-id: ${DISCORD_REPORTING_LOG_CHANNEL_ID}

codebloom:
  email:
    host: ${CODEBLOOM_EMAIL_HOST}
    port: ${CODEBLOOM_EMAIL_PORT}
    type: ${CODEBLOOM_EMAIL_TYPE}
    username: ${CODEBLOOM_EMAIL_USERNAME}
    password: ${CODEBLOOM_EMAIL_PASSWORD}

management:
  endpoints:
    web:
      exposure:
        include: prometheus
  endpoint:
    prometheus:
      enabled: true

security:
  actuator:
    username: ${ACTUATOR_USERNAME}
    password: ${ACTUATOR_PASSWORD}

secret:
  key: ${SECRET_KEY}

server:
  url: ${SERVER_URL}

app:
  commit:
    sha: "@commit.sha@"
Missing Defaults

CI profile only defines Redis URL; ensure required CI configs (DB, security, management) are inherited or intentionally omitted to prevent runtime failures in CI.

jedis:
  url: ${REDIS_URL}
Placeholders Types

Check that values like ports and booleans derived from environment variables (e.g., GH_EMAIL_PORT, ENABLE_DOCUMENTATION) parse correctly in YAML without quotes and match expected types.

springdoc:
  swagger-ui:
    enabled: ${ENABLE_DOCUMENTATION}
  api-docs:
    enabled: ${ENABLE_DOCUMENTATION}
    version: OPENAPI_3_0

github:
  username: ${GH_USERNAME}
  password: ${GH_PASSWORD}
  email:
    host: ${GH_EMAIL_HOST}
    port: ${GH_EMAIL_PORT}
    type: ${GH_EMAIL_TYPE}
    username: ${GH_EMAIL_USERNAME}
    password: ${GH_EMAIL_PASSWORD}

jda:
  discord:
    token: ${DISCORD_TOKEN}
    patina:
      guild-id: ${DISCORD_PATINA_GUILD_ID}
      leetcode-channel-id: ${DISCORD_PATINA_LEETCODE_CHANNEL_ID}
    reporting:
      error:
        guild-id: ${DISCORD_REPORTING_GUILD_ID}
        channel-id: ${DISCORD_REPORTING_CHANNEL_ID}
      log:
        guild-id: ${DISCORD_REPORTING_LOG_GUILD_ID}
        channel-id: ${DISCORD_REPORTING_LOG_CHANNEL_ID}

codebloom:
  email:
    host: ${CODEBLOOM_EMAIL_HOST}
    port: ${CODEBLOOM_EMAIL_PORT}
    type: ${CODEBLOOM_EMAIL_TYPE}
    username: ${CODEBLOOM_EMAIL_USERNAME}
    password: ${CODEBLOOM_EMAIL_PASSWORD}

management:
  endpoints:
    web:
      exposure:
        include: prometheus
  endpoint:
    prometheus:
      enabled: true

security:
  actuator:
    username: ${ACTUATOR_USERNAME}
    password: ${ACTUATOR_PASSWORD}

secret:
  key: ${SECRET_KEY}

server:
  url: ${SERVER_URL}

app:
  commit:
    sha: "@commit.sha@"

@github-actions
Copy link
Contributor

Overall Project 75.65% 🍏

There is no coverage information present for the Files changed

@az2924
Copy link
Collaborator Author

az2924 commented Jan 15, 2026

/deploy

@github-actions
Copy link
Contributor

The command to deploy to staging for the commit f1d18e5 has been triggered. View action run

@github-actions
Copy link
Contributor

Staging deployment succeeded for commit f1d18e5

View run

@github-actions
Copy link
Contributor

Overall Project 75.56% 🍏

There is no coverage information present for the Files changed

@az2924
Copy link
Collaborator Author

az2924 commented Jan 15, 2026

/deploy

@github-actions
Copy link
Contributor

The command to deploy to staging for the commit c01dbcf has been triggered. View action run

@github-actions
Copy link
Contributor

Staging deployment succeeded for commit c01dbcf

View run

@tahminator
Copy link
Owner

/ai

@tahminator
Copy link
Owner

/review

@tahminator
Copy link
Owner

/describe

@tahminator
Copy link
Owner

/improve

@github-actions
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Potential secret exposure:
Verify that all referenced environment variables (e.g., DISCORD_CLIENT_SECRET, GH_PASSWORD, ACTUATOR_PASSWORD, SECRET_KEY) are sourced only from environment/config stores and not committed. Ensure logging does not print these values. Additionally, confirm actuator exposure is limited to prometheus only and that basic auth is enforced where applicable.

⚡ Recommended focus areas for review

Env Parity

Validate that all keys from the deleted properties files were migrated 1:1 (names, nesting, and defaults). Pay special attention to boolean and numeric envs (e.g., ENABLE_DOCUMENTATION, ports) and Spring Boot property path changes that may alter behavior.

springdoc:
  swagger-ui:
    enabled: ${ENABLE_DOCUMENTATION}
  api-docs:
    enabled: ${ENABLE_DOCUMENTATION}
    version: OPENAPI_3_0

github:
  username: ${GH_USERNAME}
  password: ${GH_PASSWORD}
  email:
    host: ${GH_EMAIL_HOST}
    port: ${GH_EMAIL_PORT}
    type: ${GH_EMAIL_TYPE}
    username: ${GH_EMAIL_USERNAME}
    password: ${GH_EMAIL_PASSWORD}

jda:
  discord:
    token: ${DISCORD_TOKEN}
    patina:
      guild-id: ${DISCORD_PATINA_GUILD_ID}
      leetcode-channel-id: ${DISCORD_PATINA_LEETCODE_CHANNEL_ID}
    reporting:
      error:
        guild-id: ${DISCORD_REPORTING_GUILD_ID}
        channel-id: ${DISCORD_REPORTING_CHANNEL_ID}
      log:
        guild-id: ${DISCORD_REPORTING_LOG_GUILD_ID}
        channel-id: ${DISCORD_REPORTING_LOG_CHANNEL_ID}

codebloom:
  email:
    host: ${CODEBLOOM_EMAIL_HOST}
    port: ${CODEBLOOM_EMAIL_PORT}
    type: ${CODEBLOOM_EMAIL_TYPE}
    username: ${CODEBLOOM_EMAIL_USERNAME}
    password: ${CODEBLOOM_EMAIL_PASSWORD}

management:
  endpoints:
    web:
      exposure:
        include: prometheus
  endpoint:
    prometheus:
      enabled: true

security:
  actuator:
    username: ${ACTUATOR_USERNAME}
    password: ${ACTUATOR_PASSWORD}

secret:
  key: ${SECRET_KEY}

server:
  url: ${SERVER_URL}

app:
  commit:
    sha: "@commit.sha@"
Redis Config

Confirm the YAML key path 'jedis.url' matches the Redis client autoconfiguration expected by your code and Spring Boot starter. If the app previously used 'spring.redis.*' properties, this might not be picked up.

jedis:
  url: ${REDIS_URL}
OAuth Redirect

Ensure the templated redirect-uri "{baseUrl}/api/auth/flow/callback/{registrationId}" resolves correctly across environments and matches your OAuth app settings after the migration.

  discord:
    client-id: ${DISCORD_CLIENT_ID}
    client-secret: ${DISCORD_CLIENT_SECRET}
    scope: identify,email
    authorization-grant-type: authorization_code
    redirect-uri: "{baseUrl}/api/auth/flow/callback/{registrationId}"
provider:
  discord:
    authorization-uri: https://discord.com/oauth2/authorize
    token-uri: https://discord.com/api/oauth2/token
    user-info-uri: https://discord.com/api/users/@me
    user-name-attribute: username

@github-actions
Copy link
Contributor

Title

603: Replaced properties with yml


PR Type

Enhancement


Description

  • Migrate properties to YAML format

  • Add new application.yml configuration

  • Introduce application-ci.yml for CI env

  • Normalize time format and caching settings


Diagram Walkthrough

flowchart LR
  props["application.properties (.properties)"] -- "replaced by" --> yml["application.yml (.yml)"]
  ciproprops["application-ci.properties (.properties)"] -- "replaced by" --> ciyml["application-ci.yml (.yml)"]
  yml -- "structured sections" --> springnode["spring, springdoc, jda, github"]
  yml -- "management & security" --> ops["management, security, server, secret, app"]
Loading

File Walkthrough

Relevant files
Enhancement
application-ci.properties
Remove CI properties in favor of YAML                                       

src/main/resources/application-ci.properties

  • Remove legacy Redis property format
  • Clean up duplicate jedis.url line
+0/-1     
application-ci.yml
Add CI YAML with Redis URL                                                             

src/main/resources/application-ci.yml

  • Add YAML-based CI Redis config
  • Define jedis.url from REDIS_URL
+2/-0     
application.properties
Remove main .properties configuration                                       

src/main/resources/application.properties

  • Remove all .properties configurations
  • Prepare for consolidated YAML structure
+0/-78   
application.yml
Introduce comprehensive YAML configuration                             

src/main/resources/application.yml

  • Add hierarchical YAML configuration
  • Convert OAuth, datasource, docs settings
  • Add management, security, server, app keys
  • Adjust time formats (PT3H), cache settings
+117/-0 

@az2924
Copy link
Collaborator Author

az2924 commented Jan 15, 2026

/deploy

@github-actions
Copy link
Contributor

The command to deploy to staging for the commit ff99cab has been triggered. View action run

@github-actions
Copy link
Contributor

Overall Project 75.56% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link
Contributor

Staging deployment succeeded for commit ff99cab

View run

@tahminator
Copy link
Owner

/deploy

@github-actions
Copy link
Contributor

The command to deploy to staging for the commit ff99cab has been triggered. View action run

@github-actions
Copy link
Contributor

Staging deployment succeeded for commit ff99cab

View run

@tahminator
Copy link
Owner

/deploy

@github-actions
Copy link
Contributor

The command to deploy to staging for the commit 4095af8 has been triggered. View action run

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Contributor

Staging deployment succeeded for commit 4095af8

View run

@az2924 az2924 merged commit e4eefae into main Jan 16, 2026
14 checks passed
@az2924 az2924 deleted the 603 branch January 16, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants